﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using EzDesk.DesktopClient.ViewContract;
using EzDesk.Generic;
using EzDesk.Generic.WPF;

namespace EzDesk.DesktopClient.View
{
    /// <summary>
    /// Interaction logic for LoginView.xaml
    /// </summary>
    public partial class LoginView : UserControl,ILoginView
    {

        public object ViewModel
        {
            get
            {
                return this.DataContext;
            }
            set
            {
                this.DataContext = value;
            }
        }
        public LoginView()
        {
            InitializeComponent();
        }

        protected void login(object sender, EventArgs e)
        {
            OnLogin.ExecuteMethod(sender,Password_Tbx.Password);
        }

        public void LoginFailed()
        {
            LoginMessage_Tbx.Show();
        }

        public event EventHandler<Generic.GenericEventArg<string>> OnLogin;

        public void SePassword(string password)
        {
            throw new NotImplementedException();
        }
    }
}
